﻿using System;
using System.Linq;
using Manager;
using UnityEngine;

// Token: 0x020002DF RID: 735
public class BaseCameraControl_Ver2 : MonoBehaviour
{
	// Token: 0x060011F7 RID: 4599 RVA: 0x0009249C File Offset: 0x0009069C
	public BaseCameraControl_Ver2()
	{
		this.CamDat.Fov = 23f;
		this.CamReset.Fov = 23f;
	}

	// Token: 0x1700027F RID: 639
	// (get) Token: 0x060011F8 RID: 4600 RVA: 0x00092568 File Offset: 0x00090768
	// (set) Token: 0x060011F9 RID: 4601 RVA: 0x00092570 File Offset: 0x00090770
	public Camera thisCmaera { get; protected set; }

	// Token: 0x17000280 RID: 640
	// (get) Token: 0x060011FA RID: 4602 RVA: 0x0009257C File Offset: 0x0009077C
	// (set) Token: 0x060011FB RID: 4603 RVA: 0x00092584 File Offset: 0x00090784
	public bool isControlNow { get; protected set; }

	// Token: 0x17000281 RID: 641
	// (get) Token: 0x060011FC RID: 4604 RVA: 0x00092590 File Offset: 0x00090790
	// (set) Token: 0x060011FD RID: 4605 RVA: 0x00092598 File Offset: 0x00090798
	public global::BaseCameraControl_Ver2.Config CameraType
	{
		get
		{
			return this.cameraType;
		}
		set
		{
			this.cameraType = value;
		}
	}

	// Token: 0x17000282 RID: 642
	// (get) Token: 0x060011FE RID: 4606 RVA: 0x000925A4 File Offset: 0x000907A4
	// (set) Token: 0x060011FF RID: 4607 RVA: 0x000925B4 File Offset: 0x000907B4
	public float CameraInitFov
	{
		get
		{
			return this.CamReset.Fov;
		}
		set
		{
			this.CamReset.Fov = value;
			this.CamDat.Fov = value;
			if (this.thisCmaera != null)
			{
				this.thisCmaera.fieldOfView = value;
			}
		}
	}

	// Token: 0x17000283 RID: 643
	// (get) Token: 0x06001200 RID: 4608 RVA: 0x000925EC File Offset: 0x000907EC
	// (set) Token: 0x06001201 RID: 4609 RVA: 0x000925FC File Offset: 0x000907FC
	public Vector3 TargetPos
	{
		get
		{
			return this.CamDat.Pos;
		}
		set
		{
			this.CamDat.Pos = value;
		}
	}

	// Token: 0x17000284 RID: 644
	// (get) Token: 0x06001202 RID: 4610 RVA: 0x0009260C File Offset: 0x0009080C
	// (set) Token: 0x06001203 RID: 4611 RVA: 0x0009261C File Offset: 0x0009081C
	public Vector3 CameraAngle
	{
		get
		{
			return this.CamDat.Rot;
		}
		set
		{
			base.transform.rotation = Quaternion.Euler(value);
			this.CamDat.Rot = value;
		}
	}

	// Token: 0x17000285 RID: 645
	// (set) Token: 0x06001204 RID: 4612 RVA: 0x0009263C File Offset: 0x0009083C
	public Vector3 Rot
	{
		set
		{
			this.CamDat.Rot = value;
		}
	}

	// Token: 0x17000286 RID: 646
	// (get) Token: 0x06001205 RID: 4613 RVA: 0x0009264C File Offset: 0x0009084C
	// (set) Token: 0x06001206 RID: 4614 RVA: 0x0009265C File Offset: 0x0009085C
	public Vector3 CameraDir
	{
		get
		{
			return this.CamDat.Dir;
		}
		set
		{
			this.CamDat.Dir = value;
		}
	}

	// Token: 0x17000287 RID: 647
	// (get) Token: 0x06001207 RID: 4615 RVA: 0x0009266C File Offset: 0x0009086C
	// (set) Token: 0x06001208 RID: 4616 RVA: 0x0009267C File Offset: 0x0009087C
	public float CameraFov
	{
		get
		{
			return this.CamDat.Fov;
		}
		set
		{
			this.CamDat.Fov = value;
			if (this.thisCmaera != null)
			{
				this.thisCmaera.fieldOfView = value;
			}
		}
	}

	// Token: 0x06001209 RID: 4617 RVA: 0x000926A8 File Offset: 0x000908A8
	public virtual void Reset(int mode)
	{
		int num = 0;
		if (mode == num++)
		{
			this.CamDat.Copy(this.CamReset);
			if (this.thisCmaera != null)
			{
				this.thisCmaera.fieldOfView = this.CamDat.Fov;
			}
		}
		else if (mode == num++)
		{
			this.CamDat.Pos = this.CamReset.Pos;
		}
		else if (mode == num++)
		{
			base.transform.rotation = this.CamReset.RotQ;
		}
		else if (mode == num++)
		{
			this.CamDat.Dir = this.CamReset.Dir;
		}
	}

	// Token: 0x0600120A RID: 4618 RVA: 0x0009276C File Offset: 0x0009096C
	public virtual bool InputTouchProc()
	{
		if (Input.touchCount < 1)
		{
			return false;
		}
		float num = 10f * Time.deltaTime;
		if (Input.touchCount == 3)
		{
			this.Reset(0);
		}
		else if (Input.touchCount == 1)
		{
			Touch touch = Input.touches.First<Touch>();
			TouchPhase phase = touch.phase;
			if (phase != TouchPhase.Began)
			{
				if (phase == TouchPhase.Moved)
				{
					float num2 = 0.1f;
					float num3 = 0.01f;
					Vector3 vector = Vector3.zero;
					if (this.cameraType == global::BaseCameraControl_Ver2.Config.Rotation)
					{
						vector.y += touch.deltaPosition.x * this.xRotSpeed * num * num2;
						vector.x -= touch.deltaPosition.y * this.yRotSpeed * num * num2;
						vector += base.transform.rotation.eulerAngles;
						base.transform.rotation = Quaternion.Euler(vector);
					}
					else if (this.cameraType == global::BaseCameraControl_Ver2.Config.Translation)
					{
						this.CamDat.Dir.z = this.CamDat.Dir.z - touch.deltaPosition.x * this.xRotSpeed * num * num3;
						this.CamDat.Pos.y = this.CamDat.Pos.y + touch.deltaPosition.y * this.yRotSpeed * num * num3;
					}
					else if (this.cameraType == global::BaseCameraControl_Ver2.Config.MoveXY)
					{
						vector.x = touch.deltaPosition.x * this.xRotSpeed * num * num3;
						vector.y = touch.deltaPosition.y * this.yRotSpeed * num * num3;
						this.CamDat.Pos = this.CamDat.Pos + base.transform.TransformDirection(vector);
					}
					else if (this.cameraType == global::BaseCameraControl_Ver2.Config.MoveXZ)
					{
						vector.x = touch.deltaPosition.x * this.xRotSpeed * num * num3;
						vector.z = touch.deltaPosition.y * this.yRotSpeed * num * num3;
						this.CamDat.Pos = this.CamDat.Pos + base.transform.TransformDirection(vector);
					}
				}
			}
		}
		return true;
	}

	// Token: 0x0600120B RID: 4619 RVA: 0x000929EC File Offset: 0x00090BEC
	public virtual bool InputMouseWheelZoomProc()
	{
		bool result = false;
		float num = Input.GetAxis("Mouse ScrollWheel") * this.zoomSpeed;
		if (num != 0f)
		{
			this.CamDat.Dir.z = this.CamDat.Dir.z + num;
			this.CamDat.Dir.z = Mathf.Min(0f, this.CamDat.Dir.z);
			result = true;
		}
		return result;
	}

	// Token: 0x0600120C RID: 4620 RVA: 0x00092A60 File Offset: 0x00090C60
	protected virtual bool InputMouseProc()
	{
		bool result = false;
		bool[] array = new bool[this.CONFIG_SIZE];
		array[1] = Input.GetMouseButton(0);
		array[2] = Input.GetMouseButton(1);
		array[3] = Input.GetMouseButton(2);
		array[0] = (Input.GetMouseButton(0) && Input.GetMouseButton(1));
		for (int i = 0; i < this.CONFIG_SIZE; i++)
		{
			if (array[i])
			{
				this.isDrags[i] = true;
			}
		}
		for (int j = 0; j < this.CONFIG_SIZE; j++)
		{
			if (this.isDrags[j] && !array[j])
			{
				this.isDrags[j] = false;
			}
		}
		float axis = Input.GetAxis("Mouse X");
		float axis2 = Input.GetAxis("Mouse Y");
		for (int k = 0; k < this.CONFIG_SIZE; k++)
		{
			if (this.isDrags[k])
			{
				Vector3 zero = Vector3.zero;
				if (k == 0)
				{
					zero.x = axis * this.moveSpeed * this.rateAddSpeed;
					zero.z = axis2 * this.moveSpeed * this.rateAddSpeed;
					if (this.transBase != null)
					{
						this.CamDat.Pos = this.CamDat.Pos + this.transBase.InverseTransformDirection(base.transform.TransformDirection(zero));
					}
					else
					{
						this.CamDat.Pos = this.CamDat.Pos + base.transform.TransformDirection(zero);
					}
				}
				else if (k == 1)
				{
					zero.y += axis * this.xRotSpeed * this.rateAddSpeed;
					zero.x -= axis2 * this.yRotSpeed * this.rateAddSpeed;
					this.CamDat.Rot.y = (this.CamDat.Rot.y + zero.y) % 360f;
					this.CamDat.Rot.x = (this.CamDat.Rot.x + zero.x) % 360f;
				}
				else if (k == 2)
				{
					this.CamDat.Pos.y = this.CamDat.Pos.y + axis2 * this.moveSpeed * this.rateAddSpeed;
					this.CamDat.Dir.z = this.CamDat.Dir.z - axis * this.moveSpeed * this.rateAddSpeed;
					this.CamDat.Dir.z = Mathf.Min(0f, this.CamDat.Dir.z);
				}
				else if (k == 3)
				{
					zero.x = axis * this.moveSpeed * this.rateAddSpeed;
					zero.y = axis2 * this.moveSpeed * this.rateAddSpeed;
					if (this.transBase != null)
					{
						this.CamDat.Pos = this.CamDat.Pos + this.transBase.InverseTransformDirection(base.transform.TransformDirection(zero));
					}
					else
					{
						this.CamDat.Pos = this.CamDat.Pos + base.transform.TransformDirection(zero);
					}
				}
				result = true;
				break;
			}
		}
		return result;
	}

	// Token: 0x0600120D RID: 4621 RVA: 0x00092DC4 File Offset: 0x00090FC4
	public virtual bool InputKeyProc()
	{
		bool flag = false;
		if (Input.GetKeyDown(KeyCode.R))
		{
			this.Reset(0);
		}
		else if (Input.GetKeyDown(KeyCode.Keypad5))
		{
			this.CamDat.Rot.x = this.CamReset.Rot.x;
			this.CamDat.Rot.y = this.CamReset.Rot.y;
		}
		else if (Input.GetKeyDown(KeyCode.Slash))
		{
			this.CamDat.Rot.z = 0f;
		}
		else if (Input.GetKeyDown(KeyCode.Semicolon))
		{
			this.CamDat.Fov = this.CamReset.Fov;
			if (this.thisCmaera != null)
			{
				this.thisCmaera.fieldOfView = this.CamDat.Fov;
			}
		}
		float deltaTime = Time.deltaTime;
		if (Input.GetKey(KeyCode.Home))
		{
			flag = true;
			this.CamDat.Dir.z = this.CamDat.Dir.z + deltaTime;
			this.CamDat.Dir.z = Mathf.Min(0f, this.CamDat.Dir.z);
		}
		else if (Input.GetKey(KeyCode.End))
		{
			flag = true;
			this.CamDat.Dir.z = this.CamDat.Dir.z - deltaTime;
		}
		if (Input.GetKey(KeyCode.RightArrow))
		{
			flag = true;
			if (this.transBase != null)
			{
				this.CamDat.Pos = this.CamDat.Pos + this.transBase.InverseTransformDirection(base.transform.TransformDirection(new Vector3(deltaTime, 0f, 0f)));
			}
			else
			{
				this.CamDat.Pos = this.CamDat.Pos + base.transform.TransformDirection(new Vector3(deltaTime, 0f, 0f));
			}
		}
		else if (Input.GetKey(KeyCode.LeftArrow))
		{
			flag = true;
			if (this.transBase != null)
			{
				this.CamDat.Pos = this.CamDat.Pos + this.transBase.InverseTransformDirection(base.transform.TransformDirection(new Vector3(-deltaTime, 0f, 0f)));
			}
			else
			{
				this.CamDat.Pos = this.CamDat.Pos + base.transform.TransformDirection(new Vector3(-deltaTime, 0f, 0f));
			}
		}
		if (Input.GetKey(KeyCode.UpArrow))
		{
			flag = true;
			if (this.transBase != null)
			{
				this.CamDat.Pos = this.CamDat.Pos + this.transBase.InverseTransformDirection(base.transform.TransformDirection(new Vector3(0f, 0f, deltaTime)));
			}
			else
			{
				this.CamDat.Pos = this.CamDat.Pos + base.transform.TransformDirection(new Vector3(0f, 0f, deltaTime));
			}
		}
		else if (Input.GetKey(KeyCode.DownArrow))
		{
			flag = true;
			if (this.transBase != null)
			{
				this.CamDat.Pos = this.CamDat.Pos + this.transBase.InverseTransformDirection(base.transform.TransformDirection(new Vector3(0f, 0f, -deltaTime)));
			}
			else
			{
				this.CamDat.Pos = this.CamDat.Pos + base.transform.TransformDirection(new Vector3(0f, 0f, -deltaTime));
			}
		}
		if (Input.GetKey(KeyCode.PageUp))
		{
			flag = true;
			this.CamDat.Pos.y = this.CamDat.Pos.y + deltaTime;
		}
		else if (Input.GetKey(KeyCode.PageDown))
		{
			flag = true;
			this.CamDat.Pos.y = this.CamDat.Pos.y - deltaTime;
		}
		float num = 10f * Time.deltaTime;
		Vector3 zero = Vector3.zero;
		if (Input.GetKey(KeyCode.Period))
		{
			flag = true;
			zero.z += num;
		}
		else if (Input.GetKey(KeyCode.Backslash))
		{
			flag = true;
			zero.z -= num;
		}
		if (Input.GetKey(KeyCode.Keypad2))
		{
			flag = true;
			zero.x -= num * this.yRotSpeed;
		}
		else if (Input.GetKey(KeyCode.Keypad8))
		{
			flag = true;
			zero.x += num * this.yRotSpeed;
		}
		if (Input.GetKey(KeyCode.Keypad4))
		{
			flag = true;
			zero.y += num * this.xRotSpeed;
		}
		else if (Input.GetKey(KeyCode.Keypad6))
		{
			flag = true;
			zero.y -= num * this.xRotSpeed;
		}
		if (flag)
		{
			this.CamDat.Rot.y = (this.CamDat.Rot.y + zero.y) % 360f;
			this.CamDat.Rot.x = (this.CamDat.Rot.x + zero.x) % 360f;
			this.CamDat.Rot.z = (this.CamDat.Rot.z + zero.z) % 360f;
		}
		float deltaTime2 = Time.deltaTime;
		if (Input.GetKey(KeyCode.Equals))
		{
			flag = true;
			this.CamDat.Fov = Mathf.Max(this.CamDat.Fov - deltaTime2 * 15f, 1f);
			if (this.thisCmaera != null)
			{
				this.thisCmaera.fieldOfView = this.CamDat.Fov;
			}
		}
		else if (Input.GetKey(KeyCode.RightBracket))
		{
			flag = true;
			this.CamDat.Fov = Mathf.Min(this.CamDat.Fov + deltaTime2 * 15f, this.limitFov);
			if (this.thisCmaera != null)
			{
				this.thisCmaera.fieldOfView = this.CamDat.Fov;
			}
		}
		return flag;
	}

	// Token: 0x0600120E RID: 4622 RVA: 0x0009343C File Offset: 0x0009163C
	public virtual void Start()
	{
		this.SetCtrlSpeed();
		this.thisCmaera = base.GetComponent<Camera>();
		if (this.thisCmaera != null)
		{
			this.thisCmaera.fieldOfView = this.CamReset.Fov;
		}
		this.ZoomCondition = (() => false);
		this.isControlNow = false;
		this.isDrags = new bool[this.CONFIG_SIZE];
		for (int i = 0; i < this.isDrags.Length; i++)
		{
			this.isDrags[i] = false;
		}
		if (this.isInit)
		{
			return;
		}
		if (!this.targetObj)
		{
			Vector3 a = base.transform.TransformDirection(Vector3.forward);
			this.CamDat.Pos = base.transform.position + a * this.noneTargetDir;
		}
		this.TargetSet(this.targetObj, true);
	}

	// Token: 0x0600120F RID: 4623 RVA: 0x00093544 File Offset: 0x00091744
	public virtual void LateUpdate()
	{
		this.isControlNow = false;
		this.SetCtrlSpeed();
		if (!this.isControlNow)
		{
			global::BaseCameraControl_Ver2.NoCtrlFunc zoomCondition = this.ZoomCondition;
			bool flag = true;
			if (zoomCondition != null)
			{
				flag = zoomCondition();
			}
			this.isControlNow |= (flag && this.InputMouseWheelZoomProc());
		}
		if (!this.isControlNow)
		{
			global::BaseCameraControl_Ver2.NoCtrlFunc noCtrlCondition = this.NoCtrlCondition;
			bool flag2 = false;
			if (noCtrlCondition != null)
			{
				flag2 = noCtrlCondition();
			}
			if (!flag2)
			{
				if (this.InputTouchProc())
				{
					this.isControlNow = true;
				}
				else if (this.InputMouseProc())
				{
					this.isControlNow = true;
				}
			}
		}
		if (!this.isControlNow)
		{
			global::BaseCameraControl_Ver2.NoCtrlFunc keyCondition = this.KeyCondition;
			bool flag3 = true;
			if (keyCondition != null)
			{
				flag3 = keyCondition();
			}
			this.isControlNow |= (flag3 && this.InputKeyProc());
		}
		this.CameraUpdate();
	}

	// Token: 0x06001210 RID: 4624 RVA: 0x00093638 File Offset: 0x00091838
	public virtual void CameraUpdate()
	{
		if (this.isLimitDir)
		{
			this.CamDat.Dir.z = Mathf.Clamp(this.CamDat.Dir.z, -this.limitDir, 0f);
		}
		if (this.isLimitPos)
		{
			this.CamDat.Pos = Vector3.ClampMagnitude(this.CamDat.Pos, this.limitPos);
		}
		if (this.transBase != null)
		{
			base.transform.rotation = this.transBase.rotation * Quaternion.Euler(this.CamDat.Rot);
			base.transform.position = base.transform.rotation * this.CamDat.Dir + this.transBase.TransformPoint(this.CamDat.Pos);
		}
		else
		{
			base.transform.rotation = Quaternion.Euler(this.CamDat.Rot);
			base.transform.position = base.transform.rotation * this.CamDat.Dir + this.CamDat.Pos;
		}
		this.viewCollider.height = this.CamDat.Dir.z;
		this.viewCollider.center = -Vector3.forward * this.CamDat.Dir.z * 0.5f;
	}

	// Token: 0x06001211 RID: 4625 RVA: 0x000937D0 File Offset: 0x000919D0
	public virtual void TargetSet(Transform target, bool isReset)
	{
		if (target)
		{
			this.targetObj = target;
		}
		if (this.targetObj)
		{
			this.CamDat.Pos = this.targetObj.position;
		}
		Transform transform = base.transform;
		this.CamDat.Dir = Vector3.zero;
		this.CamDat.Dir.z = -Vector3.Distance(this.CamDat.Pos, transform.position);
		transform.LookAt(this.CamDat.Pos);
		this.CamDat.Rot = base.transform.rotation.eulerAngles;
		if (isReset)
		{
			this.CamReset.Copy(this.CamDat, base.transform.rotation);
		}
	}

	// Token: 0x06001212 RID: 4626 RVA: 0x000938A4 File Offset: 0x00091AA4
	public virtual void FrontTarget(Transform target, bool isReset, float dir = -3.40282347E+38f)
	{
		if (target)
		{
			this.targetObj = target;
		}
		if (this.targetObj)
		{
			target = this.targetObj;
			this.CamDat.Pos = target.position;
		}
		if (!target)
		{
			return;
		}
		if (dir != -3.40282347E+38f)
		{
			this.CamDat.Dir = Vector3.zero;
			this.CamDat.Dir.z = -dir;
		}
		Transform transform = base.transform;
		transform.position = target.position;
		transform.rotation.eulerAngles.Set(this.CamDat.Rot.x, this.CamDat.Rot.y, this.CamDat.Rot.z);
		transform.position += transform.forward * this.CamDat.Dir.z;
		transform.LookAt(this.CamDat.Pos);
		this.CamDat.Rot = base.transform.rotation.eulerAngles;
		if (isReset)
		{
			this.CamReset.Copy(this.CamDat, base.transform.rotation);
		}
	}

	// Token: 0x06001213 RID: 4627 RVA: 0x000939FC File Offset: 0x00091BFC
	public virtual void SetCamera(global::BaseCameraControl_Ver2 src)
	{
		base.transform.position = src.transform.position;
		base.transform.rotation = src.transform.rotation;
		this.CamDat = src.CamDat;
		this.CamDat.Pos = -(base.transform.rotation * this.CamDat.Dir - base.transform.position);
		this.CamReset.Copy(this.CamDat, base.transform.rotation);
		if (this.thisCmaera != null && src.thisCmaera != null)
		{
			this.thisCmaera.CopyFrom(src.thisCmaera);
		}
	}

	// Token: 0x06001214 RID: 4628 RVA: 0x00093ACC File Offset: 0x00091CCC
	public virtual void SetCamera(Vector3 pos, Vector3 angle, Quaternion rot, Vector3 dir)
	{
		base.transform.localPosition = pos;
		base.transform.localRotation = rot;
		this.CamDat.Rot = angle;
		this.CamDat.Dir = dir;
		this.CamDat.Pos = -(base.transform.localRotation * this.CamDat.Dir - base.transform.localPosition);
		this.CamReset.Copy(this.CamDat, base.transform.rotation);
	}

	// Token: 0x06001215 RID: 4629 RVA: 0x00093B64 File Offset: 0x00091D64
	public virtual void CopyCamera(global::BaseCameraControl_Ver2 dest)
	{
		dest.transform.position = base.transform.position;
		dest.transform.rotation = base.transform.rotation;
		dest.CamDat = this.CamDat;
		dest.CamDat.Pos = -(dest.transform.rotation * dest.CamDat.Dir - dest.transform.position);
	}

	// Token: 0x06001216 RID: 4630 RVA: 0x00093BE4 File Offset: 0x00091DE4
	public virtual void CopyInstance(global::BaseCameraControl_Ver2 src)
	{
		this.isInit = true;
		this.targetObj = src.targetObj;
		this.xRotSpeed = src.xRotSpeed;
		this.yRotSpeed = src.yRotSpeed;
		this.zoomSpeed = src.zoomSpeed;
		this.moveSpeed = src.moveSpeed;
		this.noneTargetDir = src.noneTargetDir;
		this.NoCtrlCondition = src.NoCtrlCondition;
		this.ZoomCondition = src.ZoomCondition;
		this.KeyCondition = src.KeyCondition;
		if (this.thisCmaera != null && src.thisCmaera != null)
		{
			this.thisCmaera.CopyFrom(src.thisCmaera);
		}
	}

	// Token: 0x06001217 RID: 4631 RVA: 0x00093C98 File Offset: 0x00091E98
	public virtual void OnDrawGizmos()
	{
		Gizmos.color = ((this.CamDat.Dir.z <= 0f) ? Color.blue : Color.red);
		Vector3 direction;
		if (this.transBase != null)
		{
			direction = this.transBase.TransformPoint(this.CamDat.Pos) - base.transform.position;
		}
		else
		{
			direction = this.CamDat.Pos - base.transform.position;
		}
		Gizmos.DrawRay(base.transform.position, direction);
	}

	// Token: 0x06001218 RID: 4632 RVA: 0x00093D40 File Offset: 0x00091F40
	public virtual bool SetBase(Transform _trans)
	{
		if (this.transBase == null)
		{
			return false;
		}
		this.transBase.transform.position = _trans.position;
		this.transBase.transform.rotation = _trans.rotation;
		return true;
	}

	// Token: 0x06001219 RID: 4633 RVA: 0x00093D90 File Offset: 0x00091F90
	public virtual bool SetCtrlSpeed()
	{
		/*if (global::Singleton<Manager.Config>.IsInstance())
		{
			if (Manager.Config.EtcData.CameraSpeed > 0.5f)
			{
				this.rateAddSpeed = Mathf.Lerp(1f, this.rateSpeedMax, Mathf.InverseLerp(0.5f, 1f, Manager.Config.EtcData.CameraSpeed));
			}
			else
			{
				this.rateAddSpeed = Mathf.Lerp(this.rateSpeedMin, 1f, Mathf.InverseLerp(0f, 0.5f, Manager.Config.EtcData.CameraSpeed));
			}
		}*/
		return true;
	}

	// Token: 0x040017F0 RID: 6128
	protected const float INIT_FOV = 23f;

	// Token: 0x040017F1 RID: 6129
	public Transform transBase;

	// Token: 0x040017F2 RID: 6130
	public Transform targetObj;

	// Token: 0x040017F3 RID: 6131
	public float xRotSpeed = 5f;

	// Token: 0x040017F4 RID: 6132
	public float yRotSpeed = 5f;

	// Token: 0x040017F5 RID: 6133
	public float zoomSpeed = 5f;

	// Token: 0x040017F6 RID: 6134
	public float moveSpeed = 0.05f;

	// Token: 0x040017F7 RID: 6135
	public float noneTargetDir = 5f;

	// Token: 0x040017F8 RID: 6136
	public float rateSpeedMin = 0.5f;

	// Token: 0x040017F9 RID: 6137
	public float rateSpeedMax = 2f;

	// Token: 0x040017FA RID: 6138
	public bool isLimitPos;

	// Token: 0x040017FB RID: 6139
	public float limitPos = 2f;

	// Token: 0x040017FC RID: 6140
	public bool isLimitDir;

	// Token: 0x040017FD RID: 6141
	public float limitDir = 10f;

	// Token: 0x040017FE RID: 6142
	public float limitFov = 40f;

	// Token: 0x040017FF RID: 6143
	public global::BaseCameraControl_Ver2.NoCtrlFunc NoCtrlCondition;

	// Token: 0x04001800 RID: 6144
	public global::BaseCameraControl_Ver2.NoCtrlFunc ZoomCondition;

	// Token: 0x04001801 RID: 6145
	public global::BaseCameraControl_Ver2.NoCtrlFunc KeyCondition;

	// Token: 0x04001802 RID: 6146
	public readonly int CONFIG_SIZE = Enum.GetNames(typeof(global::BaseCameraControl_Ver2.Config)).Length;

	// Token: 0x04001803 RID: 6147
	[SerializeField]
	protected global::BaseCameraControl_Ver2.CameraData CamDat;

	// Token: 0x04001804 RID: 6148
	protected global::BaseCameraControl_Ver2.Config cameraType = global::BaseCameraControl_Ver2.Config.Rotation;

	// Token: 0x04001805 RID: 6149
	protected bool[] isDrags;

	// Token: 0x04001806 RID: 6150
	protected global::BaseCameraControl_Ver2.ResetData CamReset;

	// Token: 0x04001807 RID: 6151
	protected bool isInit;

	// Token: 0x04001808 RID: 6152
	protected CapsuleCollider viewCollider;

	// Token: 0x04001809 RID: 6153
	protected float rateAddSpeed = 1f;

	// Token: 0x020002E0 RID: 736
	[Serializable]
	protected struct CameraData
	{
		// Token: 0x0600121B RID: 4635 RVA: 0x00093E24 File Offset: 0x00092024
		public void Copy(global::BaseCameraControl_Ver2.ResetData copy)
		{
			this.Pos = copy.Pos;
			this.Dir = copy.Dir;
			this.Rot = copy.Rot;
			this.Fov = copy.Fov;
		}

		// Token: 0x0400180D RID: 6157
		public Vector3 Pos;

		// Token: 0x0400180E RID: 6158
		public Vector3 Dir;

		// Token: 0x0400180F RID: 6159
		public Vector3 Rot;

		// Token: 0x04001810 RID: 6160
		public float Fov;
	}

	// Token: 0x020002E1 RID: 737
	protected struct ResetData
	{
		// Token: 0x0600121C RID: 4636 RVA: 0x00093E5C File Offset: 0x0009205C
		public void Copy(global::BaseCameraControl_Ver2.CameraData copy, Quaternion rot)
		{
			this.Pos = copy.Pos;
			this.Dir = copy.Dir;
			this.Rot = copy.Rot;
			this.RotQ = rot;
			this.Fov = copy.Fov;
		}

		// Token: 0x04001811 RID: 6161
		public Vector3 Pos;

		// Token: 0x04001812 RID: 6162
		public Vector3 Dir;

		// Token: 0x04001813 RID: 6163
		public Vector3 Rot;

		// Token: 0x04001814 RID: 6164
		public Quaternion RotQ;

		// Token: 0x04001815 RID: 6165
		public float Fov;
	}

	// Token: 0x020002E2 RID: 738
	public enum Config
	{
		// Token: 0x04001817 RID: 6167
		MoveXZ,
		// Token: 0x04001818 RID: 6168
		Rotation,
		// Token: 0x04001819 RID: 6169
		Translation,
		// Token: 0x0400181A RID: 6170
		MoveXY
	}

	// Token: 0x020002E3 RID: 739
	// (Invoke) Token: 0x0600121E RID: 4638
	public delegate bool NoCtrlFunc();
}
